// Set new default font family and font color to mimic Bootstrap's default styling
Chart.defaults.global.defaultFontFamily = '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
Chart.defaults.global.defaultFontColor = '#292b2c';

// Bar Chart Example
var ctx = document.getElementById("myBarChart");
var myLineChart = new Chart(ctx, {
  type: 'bar',
  data: {
    labels: ["一月", "二月", "三月", "四月", "五月"],
    datasets: [{
      label: "健身总人数",
      backgroundColor: [
        "rgba(128, 216, 207, 0.7)",  // 红色
        "rgba(255, 159, 159, 0.7)", // 蓝色
        "rgba(255, 221, 147, 0.7)", // 黄色
        "rgba(153, 200, 254, 0.7)", // 青色
        "rgba(152, 154, 202, 0.7)", // 紫色

      ],
      borderColor: [
        "rgba(128, 216, 207, 1)",
        "rgba(255, 159, 159, 1)",
        "rgba(255, 221, 147, 1)",
        "rgba(153, 200, 254, 1)",
        "rgba(152, 154, 202, 1)",

      ],
      borderWidth: 1,
      data: [4215, 5312, 6251, 7841, 9821],
    }],
  },
  options: {
    scales: {
      xAxes: [{
        time: {
          unit: 'month'
        },
        gridLines: {
          display: false
        },
        ticks: {
          maxTicksLimit: 6
        }
      }],
      yAxes: [{
        ticks: {
          min: 0,
          max: 15000,
          maxTicksLimit: 5
        },
        gridLines: {
          display: true
        }
      }],
    },
    legend: {
      display: false
    }
  }
});
